#region "CommandTypeExtensions"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014-07-15 10:26:32
 * 
 * ####     Namespace : System.Data
 * 
 * ####     Type Name : CommandTypeExtensions
 * 
 * ####     Full Name : System.Data.CommandTypeExtensions
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18444
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion


namespace System.Data
{
    /// <summary>
    /// <para>System.Data.CommandTypeExtensions</para>
    /// <para>
    /// 为<see cref="CommandType"/>提供的扩展方法。
    /// </para>
    /// </summary>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    public static class CommandTypeExtensions
    {
        #region ToCmdTypeString
        /// <summary>
        /// 转换成命令类型字符串。
        /// </summary>
        /// <param name="current"><see cref="CommandType"/>中的一个值。</param>
        /// <returns><see cref="String"/>表达式。</returns>
        static public string ToCmdTypeString(this CommandType current)
        {
            string expr = "cmdtype::text";
            switch (current)
            {
                case CommandType.StoredProcedure: expr = "cmdtype::stored procedure"; break;
                case CommandType.TableDirect: expr = "cmdtype::tabledirect"; break;
            }
            return expr;
        }
        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion